<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Insert title here</title>
    <script type="text/javascript" src="seed-min.js"></script>
    <style type="text/css">
      * {
        margin: 0;
        padding: 0;
      }
      .post_input {
        width: 50%;
        min-height: 120px;
        max-height: 300px;
        padding: 3px;
        outline: 0;
        border: 1px solid #a0b3d6;
        font-size: 12px;
        line-height: 24px;
        word-wrap: break-word;
        overflow-x: hidden;
        overflow-y: auto;
        border-color: rgba(82, 168, 236, 0.8);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1),
          0 0 8px rgba(82, 168, 236, 0.6);
      }
      .box1 {
        position: absolute;
        top: 80px;
        width: 200px;
        height: 200px;
        background-color: blue;
      }
      .box2 {
        width: 100px;
        height: 100px;
        background-color: red;
        margin-top: 100px;
      }
    </style>
  </head>
  <body>
    <div class="post_input" contenteditable="true"></div>

    <button id="insertImg">insertImg</button>
    <script type="text/javascript">
      let postInput = document.querySelector(".post_input");
      let insert = document.getElementById("insertImg");
      let str = `Mac Release Build Release Failed
Compile Failed: <span contentEditable="false"><a href="https://master-18.jenkins.autodesk.com/job/Fusion/job/client-delivery/view/change-requests/job/PR-16764/10/artifact/NeutronBuildCommentLog_MAC_Release.log" target="_blank">see MAC_Release logs here</a></span>
Windows Release Build Release Failed
Compile Failed: <a contentEditable="false" href="https://master-18.jenkins.autodesk.com/job/Fusion/job/client-delivery/view/change-requests/job/PR-16764/10/artifact/NeutronBuildCommentLog_Windows_Release.log" target="_blank">see Windows_Release logs here</a>
Mac Debug Build Debug Failed
Compile Failed: <a href="https://master-18.jenkins.autodesk.com/job/Fusion/job/client-delivery/view/change-requests/job/PR-16764/10/artifact/NeutronBuildCommentLog_MAC_Debug.log" target="_blank">see MAC_Debug logs here</a>
Windows Debug Build Debug Failed
Compile Failed: <a href="https://master-18.jenkins.autodesk.com/job/Fusion/job/client-delivery/view/change-requests/job/PR-16764/10/artifact/NeutronBuildCommentLog_Windows_Debug.log" target="_blank">see Windows_Debug logs here</a>`;
      postInput.innerHTML = str;
      console.log(postInput.innerHTML);
      insert.onclick = function () {
        let str = "";
        str = postInput.innerHTML.replace(
          /<a|<div>|<\/div>/g,
          function (_, g1) {
            switch (_) {
              case "<div>":
                return "";
                break;

              case "</div>":
                return "</br>";
                break;
            }
          }
        );
        console.log(str);
      };
      // require("editor", function (editor) {
      //   avalon.bind($("insertImg"), "click", function `(e) {
      //     editor.insertImage("<img src='1.jpeg'>");
      //     editor.insertImage("<img src='1.jpeg'>");
      //     // editor.insertImage('1.jpeg');
      //     // editor.insertImage('1.jpeg');
      //   });
      // });
    </script>
  </body>
</html>
